Til about raycast! The productivity tool that our macs should have shipped with ❤️
Need a tool to help you manage your versioning and changelogs? Check out changesets!
Today I learned how to create multiple Neovim Configs. I’ve set up a home and work config respectively.
TIL about git recent
by Paul Irish. It’s a command that shows you your latest
local git branches! Super useful when you’re at work and got a lot of stuff on
the go.
git recent
# example output
:'
* main 7167899 (19 hours ago) Taranveer Bains
new til
feature/partytown 548eaf3 (2 days ago) Taranveer Bains
chore(dev-server): update dev script
'
After being laid off from Productboard, I’ve been spending time thinking about how I want to continue with my career and what to do with my spare time. Of course landing a job is my priority, but during my time off, I want to devote time to learning skills and technology that I’ve never been able to make the time for in the past.
One thing I’ve always wanted to do (for the “by the way factor”) was setting up vim for my local development work. I devoted the entire day today to set up my neovim config; I’m pretty happy with it so far.
So if you wanna figure out which commit in a repo caused an issue, git has a useful command to do just that.
git bisect
There’s been a lot of new developments in the space of package bundlers. From the OG Webpack to, Rollup to the new kid on the block esbuild each of them have their own unique set of features.
esbuild offers better build times as it is written in Go, which is compiled to JavaScript. The tradeoff here is that es5 isn’t supported (but that’s okay if you’re not supporting IE11). It’s pretty awesome but as it’s in active development and fairly new, it’s not as widely used as the other bundlers and therefore doesn’t have the rich plugin resource that somethings like webpack has.
However, you can leverage esbuild and plug it into a webpack config and via esbuild-loader I did this at work today and it helped with devserver startup times and greatly improved the production build times.
TIL that there is a cache control header for a shared cache. The s-max-age is similar to the max-age in that they both set a timer to invalidate a cache for a particular resource. The difference between the two is that the s-max-age applies to shared content and therefore applies to content on a CDN.
This is better in circumstances where we want to force an invalidation for a particular resource. This is not possible with max-age.
There’s a Netlify Identity Widget (that is framework agnostic) which can be leveraged to add some authentication to web apps deployed to Netlify.
There’s a limit of 1000 people but for a small e-commerce business that’s more than enough.
While working through my functional programming course, I encountered a fun little leet code exercise. It’s fucking computer science so I’m not even surprised I had to solve a problem like this -.-
Anyway, here’s how the pascal triangle code will work in JS and in Scala
function run() {
for (let row = 0; row <= 10; row++) {
const rec = []
for (let col = 0; col <= row; col++) {
rec.push(pascal(col, row))
}
console.log(rec)
}
}
const pascal = (col, row) => {
if (col === 0 || row < 1 || col === row) return 1
else return pascal(col, row - 1) + pascal(col - 1, row - 1)
}
run()
def main(args: Array[String]): Unit = {
println("Pascal's Triangle")
for (row <- 0 to 10) {
for (col <- 0 to row)
print(s"${pascal(col, row)} ")
println()
}
}
/**
* Exercise 1
*/
def pascal(c: Int, r: Int): Int = {
// base case is if c = 0, just 1
if (c == 0 || r < 2 || c == r) 1
else pascal(c, r -1) + pascal(c - 1, r - 1)
}
Don’t be a sucka! TIL that you can get free HTTPS on your server thanks to a handy tool called Certbot.
Suck on that people who tried to charge me for HTTPS.
Single sign-on (SSO) is a property of access control of multiple related, yet indepdent records. Thanks to this property, users can log in with a single ID and password to gain access to any of several related systems.
If you’re working in a corporate setting, this is how you’re able to seamlessly switch between applications (maybe in the browser) and not have to log in despite the fact that all these systems have some sort of authentication and authorization piece associated with them.
I’ll be honest, up until today, I never really cared about character encodings and didn’t ever bother to learn anything about them… what a huge mistake! Character encodings are the unsung heroes that allow us to display languages (besides English) reliabely on computer systems.
The gist of UTF-8 is that it is an encoding that allows us to take Unicode code and map said codes to meaningful linguinstic representations. Codes that are between 0 and 127 occupy 8 bits — a single byte — and then any codes above this upper bound can use up to 6 bytes. The beauty of this system is that strings encoded in UTF-8 look exactly the same as strings encoded in ASCII. Americans are chilling and don’t need to worry about squat, while the rest of the world has to “jump through hoops” to make sure that they’re alphhabet will work across computer systems.
Buddy works allows us to create pipelines for our projects! Similar to how
envoyer and deploybot works!
It comes with a bunch of prebuilt recipes for when you try to set up your
actions. We’re using it to do deployments to a project site after PRs are merged
and firing off notifications on slack!